﻿using CRM.Admin.Contracts.Model.Customer;
using KingsSharp.Core.Data.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CRM.Admin.Services.EntityConfigurations.Customer
{
    /// <summary>
    /// 推广计划
    /// </summary>
    public class PromotionPlanCfg : EntityConfigurationBase<PromotionPlan, Guid>
    {
        public PromotionPlanCfg()
        {
            Property(a => a.Address).HasMaxLength(200);
            Property(a => a.Content).HasMaxLength(500);
            Property(a => a.Result).HasMaxLength(500);
            Property(a => a.Files).HasMaxLength(200);
            HasRequired(a => a.Customer).WithMany(l => l.PromotionPlans).HasForeignKey(a => a.CustomerId);
        }
    }
}
